<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        var url = "http://item.taobao.com/item.htm?a=1&b=2&d=xxx&e"
        function w(url) {
            var str = url.split("?")[1];
            var iterms = str.split("&");
            var arr, Json = {};
            for (var i = 0; i < iterms.length; i++) {
                arr = iterms[i].split("=");
                Json[arr[0]] = arr[1];
            }
            return Json;
        }

        var obj = w(url);
        console.log(obj);
    </script>
</body>

</html>